package com.example.gateway.middle.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author wangjinlong
 * @date 2022/2/16 18:00
 */
@Component
public class GatewayController {

    @Autowired
    private ApplicationContext applicationContext;

    @PostConstruct
    public void test(){
        String[] names = applicationContext.getBeanDefinitionNames();
        for (String name : names) {
            System.out.println(name);
        }
    }
}
